class Qr {
  //提供给外部的接口
  make(content) {
    this.content = content
    return this.#render(content)
  }

  //功能在生产过程中的局部动作，封装成一个私有方法
  #render() {
    return `准备生成二维码${this.content}`
  }
}

const goods = [
  { name: 'IPAD', price: 199 },
  { name: 'ThinkPad Carbon X1', price: 9999 },
  { name: 'macbook Air m1', price: 7000 },
]
//a{ name: 'IPAD', price: 199 },
//10000
let res = goods.reduce((a, b) => {
  return a + b.price
}, 0)

// console.log(res)

console.table(
  goods.sort(function (a, b) {
    return b.price - a.price
  })
)
